import request from '@/utils/request-data';

enum Api {
  Login = '/admin/acl/index/login',
  Logout = '/admin/acl/index/logout',
  getUserInfo = '/admin/acl/index/info',
}
/**
 * 登陆
 * @param username 用户名
 * @param password 密码
 * @returns LoginResponseModel
 */
export const loginApi = (username: string, password: string) => {
    return request.post<any,any>(Api.Login, {username, password})
  }
  /**
 * 退出登陆
 * @returns 
 */
export const logoutApi = () => {
    return request.post<any, null>(Api.Logout)
  }
  
  /**
   * 获取用户信息
   * @returns UserInfoResponseModel
   */
  export const getUserInfoApi = () => {
    return request.get<any>(Api.getUserInfo)
  }